<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
	<%@include file="/views/common/include/taglib.jsp"%>
	<%@include file="/views/common/include/head.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/table.css" />
	<script src="${ctx}/js/controllers/base/cellunit/CelluintEditController.js" type="text/javascript"></script>
	
</head>
<body style="margin: 0px">
	<section class="mainborder">
       <section class="edit_scrollable padder">
         <div class="edit_content">
		<form id="myFrom">
			 <div class="form" >
			 <div class="item">
					<label class="col-sm-1 editlable">单元名：</label>
					<div class="fl">
				 		<input id="cellunitId" type="hidden" value="${cellUnit.id}">
						<input class="editform-control"  onblur="checkUnitName()" id="cellunitName" type="text" value="${cellUnit.name}" class="text" maxlength="25" placeholder="请输入单元名"/>
						<em class="emStyle">*</em>
					</div>
				</div>
			    <div class="item">
					<input id="unitCellId" type="hidden" value="${cellUnit.cellId}">
		              <label class="col-sm-1 editlable">小区名：</label>
		                <div class="fl">
		                  <c:if test="${type == 1 }">
						  	<input id="cellid" class="editform-control" style="padding-left: 9px;" type="text" value="${sessionScope.user_login.currentCell.cellName}" readonly="readonly">
		                  </c:if>
		                  <c:if test="${type == 2 }">
		                  		<input id="cellid" class="editform-control" value="${cellUnit.cellName}" type="text" disabled="disabled">
		                  </c:if>
		                  <em class="emStyle">*</em>
		           </div>
		       </div>
			   <div class="item">
					<input id="regionId" type="hidden" value="${cellUnit.regionId }">
		              <label class="col-sm-1 editlable" >区域名：</label>
		                <div class="fl">
		                  	<select class="editform-control" onblur="checkRegionName()"  style="height:29px;width:210px;" id="regionid" >
		                  		<option value="" >--区域--</option>
		                  			<c:forEach items="${cellRegions}" var="item" varStatus="cStatus">
										<option value="${item.id}" <c:if test="${item.id == cellUnit.regionId}">selected="selected"</c:if>>${item.name}</option>
								  	</c:forEach>
		                  	</select>
		                  <em class="emStyle">*</em>
		           </div>
		       </div>	
			   <div class="item">
					<input id="buildingId" type="hidden" value="${cellUnit.buildingId }">
		              <label class="col-sm-1 editlable">楼栋名：</label>
		                <div class="fl">
		                  	<select class="editform-control" onblur="checkBuildingName()"  style="height:29px;width:210px;" id="buildingid">
		                  		<option value="">--楼栋--</option>
		                  	</select>
		                  <em class="emStyle">*</em>
		           </div>
		       </div>	
				<div class="item">
					<span class="col-sm-1 editlable">排序：</span>
					<div class="fl">
						<input style="width:60px;" id="sort" onblur="checkSort();" class="editform-control" type="number" maxlength="50" value="${cellUnit.sort == null ? 1 : cellUnit.sort}">
					    <em class="emStyle">*</em>
                    </div>
				</div>
				<div class="item">
					<span class="col-sm-1 editlable">备注：</span>
					<div class="fl">
					<input class="editform-control" id="memo" type="text" maxlength="100" value="${cellUnit.memo}">
					</div>
				</div>
			</div>
				</form>
			</div>

		</section>
	</section>
    	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
	</script>             
	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</body>
</html>
